#!/usr/bin/env python
# _*_coding:utf-8_*_

"""
@Time :    2019/10/24 20:11
@Author:  ThinHeader
@File: urls.py
@Software: PyCharm
"""
from django.conf.urls import url

from product.views import ProductListView, ProductAddView, ProductEditView, ProductShelveView, ProductDeleteView, \
    ProductOrderListView, ProductMobileListView, ProductDetailView

urlpatterns = [
    # 活动列表
    url(r'^list/(?P<shop_id>[0-9]+)$', ProductListView.as_view(), name='list'),
    # 活动添加
    url(r'^add/(?P<shop_id>[0-9]+)$', ProductAddView.as_view(), name='add'),
    url(r'^edit/(?P<shop_id>[0-9]+)$', ProductEditView.as_view(), name='edit'),
    # 活动上下架
    url(r'^shelve/(?P<shop_id>[0-9]+)$', ProductShelveView.as_view(), name='shelve'),
    # 活动删除
    url(r'^delete/(?P<shop_id>[0-9]+)$', ProductDeleteView.as_view(), name='delete'),

    # mobile端路由
    url(r'^mobile_list$', ProductMobileListView.as_view(), name='mobile_list'),
    url(r'^detail_(?P<product_id>\d+)$', ProductDetailView.as_view(), name='detail'),
    # 订单路由
    url(r'^order_list/(?P<shop_id>[0-9]+)$', ProductOrderListView.as_view(), name='order_list'),

]
